package ooday03;

public class RefArrayDemo {
    public static void main(String[] args) {
        Student[] stus = new Student[3];
        stus[0] = new Student("zhangsan",25,"lf");
        stus[1] = new Student("lisi",24,"jms");
        stus[2] = new Student("wangwu",27,"sd");

        System.out.println(stus[0].name);
        stus[1].age = 27;
        stus[2].sayHi();
        for (int i = 0;i<stus.length;i++){
            System.out.println(stus[i].name);
            stus[i].sayHi();
        }
        Student[] ss = {
                new Student("zhangsan",25,"lf"),
                new Student("lisi",24,"jms"),
                new Student("wangwu",27,"sd")
        };
        for (int i = 0; i < stus.length; i++) {
            
        }
    }
}
